/*
 *  $Id: Arrays.java 362 2011-09-19 07:24:04Z martinlaz@gmail.com $
 *
 *  Author:
 *     Martin Lazarov [mlazarov at sfs.uni-tuebingen.de]
 *     
 *  This file is part of the Gralej system
 *     http://code.google.com/p/gralej/
 *
 *  Gralej is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Gralej is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

package gralej.util;

public final class Arrays {
    public static String concat(String delimiter, Object... objects) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < objects.length; ++i) {
            if (i > 0)
                sb.append(delimiter);
            sb.append(objects[i]);
        }
        return sb.toString();
    }
    
    public static String concat(Object... objects) {
        return concat("", objects);
    }
    
    public static <T> T[] tuple(T... ts) {
        return ts;
    }
}
